package com.itaming.lycheeframework.security.token;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Builder;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * Token响应
 *
 * @author A.Ming
 */
@Builder(builderClassName = "Builder")
@Data
public class TokenResponse implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * AccessToken
     */
    private String accessToken;

    /**
     * AccessToken过期时间，单位：秒
     */
    private int expiresIn;

    /**
     * RefreshToken
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String refreshToken;

    /**
     * 用户信息
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Object userInfo;

}
